package com.cnhis.cloudhealth.clinical.hosnurse.hosparamter.bo;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cnhis.cloudhealth.clinical.hosnurse.hosparamter.dao.HosParameterDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;

@Service
public class HosParameterBo {
	@Resource
	private HosParameterDao hosParamterDao;
	
	public ModelVo queryAllParamter(Map map)throws Exception{
		ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosParamterDao.queryAllParamter(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
	}
	public ModelVo checkPromoter(Map map)throws Exception{
		ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosParamterDao.checkPromoter(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
	}
	public ModelVo adviceProperty()throws Exception{
		ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosParamterDao.adviceProperty();
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
	}
	public ModelVo feeScale()throws Exception{
		ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosParamterDao.feeScale();
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
	}
	public ModelVo getComment(Map map)throws Exception{
		ModelVo mo = new ModelVo();
		List list =null;
		try {
			list=hosParamterDao.getComment(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
	}
}
